<!-- * list -->
{if $smarty.get.group_id}
	{ext->class_function class="docum" func="get_products_by_search" group_id=$smarty.get.group_id search=$smarty.get.query assign="product_data"}
{else}
	{ext->class_function class="docum" func="get_products_by_search" search=$smarty.get.query assign="product_data"}
{/if}	
{*debug var=$product_data*}
{ext->countArray array=$product_data.search.products assign="product_count"}
<!-- /* list -->
<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td height="12"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>		
	</tr>
	<tr>
		<td height="1" bgcolor="#25404E"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
	</tr>
</table>

{if $product_count>0}
	<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
		<tr>		
			<td  height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="100">{t t='Grupė'}</td>	
			<td style="font-size:9px; color:#4C4C4C; text-align:left; padding:0px 0px 0px 10px">Pavadinimas</td>			
		</tr>
	</table>
	<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
			<td height="1" bgcolor="#D6DBDE"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
		</tr>
	</table>
	{foreach from=$product_data.search.products key="key" item="el"}
		<!-- * -->
		<table width="100%" cellpadding="0" cellspacing="0">
			<tr>
				<td height="1" bgcolor="#FFFFFF"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
			</tr>
		</table>
		<table width="100%" cellpadding="0" cellspacing="0" bgcolor="{if $el.parent}#ffffff{else}#F4F6F7{/if}">
			<tr>
				{ext->class_function class="docum" func="get_product_group_data" group=$el.group_id assign="group_data"}
				<td height="22" width="100" align="center" style="border-right:1px solid #D6DBDE"><a href="index.php?admin=1&tpl_docum_module=goods&group_id={$el.group_id}&tpl_group_filter={$group_data.parent}">{t t='Atidaryti grupę'}</a></td>			
				<td style="padding:0px 0px 0px 10px; border-right:1px solid #D6DBDE"><a href="index.php?admin=1&tpl_docum_module=product&product_id={$key}&group_id={$el.group_id}&tpl_group_filter={$group_data.parent}">{$el.product_name}</a></td>
			</tr>
		</table>
		<table width="100%" cellpadding="0" cellspacing="0">
			<tr>
				<td height="1" bgcolor="#D6DBDE"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
			</tr>
		</table>
		<!-- /* -->
	{/foreach}
{else}
<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td height="50" bgcolor="#FFFFFF" align="center" style="padding:15px">
		{t t='Pagal nurodytus kriterijus nieko neradome'}		
		</td>		
	</tr>
</table>
{/if}

<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td height="1" bgcolor="#25404E"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
	</tr>
	<tr>
		<td height="12"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>		
	</tr>	
</table>




